Skip to content

Conversation

@Kanaduchi
Copy link

Proposed Changes

(Describe the changes and rationale behind them)

Related Issues

(Github link to related issues or pull requests)

@Kanaduchi
Copy link
Author

@erwindouna, could you please review my PR? Currently, it is impossible to use MELCloud integration in HA in delegated mode.

@erwindouna
Copy link
Owner

Sorry @Kanaduchi this slipped of my radar. I'll spend some time this evening to give it a proper review.

@erwindouna erwindouna added the enhancement New feature or request label Dec 30, 2025
) as resp:
resp.raise_for_status()
data = await resp.json()
if isinstance(data, dict):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there also a more thorough way to determine the a successful call of this type? HTTP statuscode or content-type returned?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Status code is checked by raise_for_status. I will add an additional check for content-type. Thank you for the idea

if self._device_units is None and self.access_level != ACCESS_LEVEL.get(
"GUEST"
):
if self._device_units is None:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand this correctly, removing the check if the access level is not guest, will allow the usage for delegated devices?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed it because a try-catch block covers this case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants